[LIBXC] Fix xc_map_grant_refs() function.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 12 Jul 2007 13:14:29 +0000 (14:14 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 12 Jul 2007 13:14:29 +0000 (14:14 +0100)
This patch fixes the xc_map_grant_refs() function, which would fail
because, instead of passing the malloc()-ed ioctl argument pointer to
the ioctl, the address of this pointer was being passed instead.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
tools/libxc/xc_linux.c

index 12adfc92a53bf861215b911891dc9156f98c838a..440cb4f0f4b91a81973a5968bdd6f41c2a65e20c 100644 (file)
@@ -456,7 +456,7 @@ void *xc_gnttab_map_grant_refs(int xcg_handle,
 
     map->count = count;
     
-    if ( ioctl(xcg_handle, IOCTL_GNTDEV_MAP_GRANT_REF, &map) )
+    if ( ioctl(xcg_handle, IOCTL_GNTDEV_MAP_GRANT_REF, map) )
         goto out;
 
     addr = mmap(NULL, PAGE_SIZE * count, prot, MAP_SHARED, xcg_handle,